A spatial position of each point in an image is closely related to a color displayed at each point on the page. The relationship between the spatial position and the color is often described by using a continuous function or a piecewise continuous function. The color presented at the position of each point on the primitive is changed gradually, which is known as gradient.
Several types of gradients are defined in the PDF/PostScript standard, including a function gradient, a linear gradient, a circular gradient, a free structure gradient, a staggered structure gradient, Koons gradient, and a tensor gradient. A typical circular gradient is shown in FIG. 1.
As mentioned above, depending on the gradient, the color displayed at each point on a primitive is calculated through a corresponding function, wherein the spatial position of the point will be taken as an independent variable. For example, the following variables are first defined in the circular gradient:                (a) spatial positions of two circles C0:(x0,y0,r0), C1:(x1,y1,r1);        (b) initial parameters of the two circles t0,t1;        (c) color at the two periphery for the two circles S0,S1;        (d) a spatial color converting function ƒ(t); and        (e) all the other points of the spatial space are located at circles Cs: (xc(s),yc(s), r(s)), each of which corresponds to a value of t where t0≦t≦t1.        
Next, the color displayed at each point between the circles C0 and C1 are calculated by the following functions:
                    {                                                                                                  x                    c                                    ⁡                                      (                    s                    )                                                  =                                                      x                    0                                    +                                      s                    ×                                          (                                                                        x                          1                                                -                                                  x                          0                                                                    )                                                                                                                                                                                    y                    c                                    ⁡                                      (                    s                    )                                                  =                                                      y                    0                                    +                                      s                    ×                                          (                                                                        y                          1                                                -                                                  y                          0                                                                    )                                                                                                                                                                r                  ⁡                                      (                    s                    )                                                  =                                                      r                    0                                    +                                      s                    ×                                          (                                                                        r                          1                                                -                                                  r                          0                                                                    )                                                                                                                                              s                =                                                      (                                          t                      -                                              t                        0                                                              )                                    /                                      (                                                                  t                        1                                            -                                              t                        0                                                              )                                                                                                          (        1.1        )            
The circle (xc(s),yc(s), r(s)) in each space corresponds to a specific t, and thus the color value of each point at the periphery may be calculated by plugging t into the function ƒ(t). When the primitive is rasterized, space coordinates may be calculated for each point in the gradient space based on space coordinates of the point in the current device page; t is calculated for the point according to the calculated space coordinates and equations set (1.1); and then the final color displayed at the point is calculated.
According to other types of gradients, the primitive may be described and rasterized in a similar way, that is, the initial parameters t0, t1 the initial colors S0, S1, the spatial color function ƒ(t) may also be similarly determined, wherein t0≦t≦t1.
It can be seen from the above that each device point covered by the primitive needs to be calculated when the primitive is rasterized. Therefore, the rasterization efficiency is relatively low when the resolution of the device is high. In this regard, when the resolution of the device is high, it needs to reduce the resolution first and then to calculate. After that, the reduced resolution needs to be increased up to the original resolution when the final page is finished. Normally, the ratio of the final resolution to the reduced resolution is called resolution reduction coefficient.
Common methods for reducing the resolution are often not flexible. For example, according to some methods, the ratio of the resolution to mesh count of a screening may be determined as the resolution reduction coefficient. According to another method, the ratio of a length of the primitive in the page to the color difference between both ends of the primitive may be determined as the resolution reduction coefficient. The inventors have found that the characteristics of the gradient primitive are not fully considered when reducing the resolution in these methods. As a result, for a relatively gentle color gradient, the current methods may not achieve better rasterization efficiency; on the other hand, for a steep color gradient, they often lose the original characteristics of the primitives. For example, one type of distortions may be that a sawtooth appears at a position of dramatic color transition. An exemplary sawtooth phenomenon is shown in FIG. 2.